LASERBRAIN the ATARI SLM804 Laser Printer Driver version 1.31 March 25th , 1989 written by: Klaus Garms & Pierre Hansen produced by: DMC Design-Marketing-Comunication Sch”ne Aussicht 41 6229 Walluf West Germany Documentation translated by Stephan Muhs & Dagmar Livora Wilhelmstr. 51 5000 Cologne 60 West Germany Copyright (c) 1989 ATARI Corp. 1196 Borregas Ave. Sunnyvale, CA 94086 This software is released as FREEWARE. This means that you can give it away to Atari owners free of charge. Atari neither implies nor expresses any warranty or future upgrades to this software. LaserBrain is given away freely in an "as is" state. GETTING STARTED In order to use LASERBRAIN, you'll first need to set up your computer system and laser printer. You should have the following components in your system: * Atari MEGA or ST computer * Atari double-sided floppy disk drive and formatted disks * Atari SH hard disk drive (optional) * Atari monochrome monitor * Atari SLM804 Laser printer and SLMC804 controller Set up your computer and laser printer, following the instructions in your owner's manuals. Before using LASERBRAIN, make sure to have a good knowledge of your Atari computer and laser printer and therefore read the owner's manuals supplied with the equipment. It is essential for you to copy the LASERBRAIN disk and store the original disk as your backup copy. This will protect you from loosing the original disk or damaging its contents. If you have a hard disk, then copy LASERBRAIN into the root directory of drive C. Always work with your copy. Store the original disk in a safe place protected from dust, moisture, direct sunlight and sources of electric power or magnetism. If the information on your working disk is damaged or accidentially erased, use your LASERBRAIN original disk for a new copy. INTRODUCTION The Atari SLM804 Laser printer is just another example of Atari's policy of "Power Without The Price". Now, for the first time, a high quality laser printer is available at the price of a good dot-matrix printer. Even the best hardware is almost useless if it doesn't go along with existing and common software. Since the SLM804 will only work in graphics mode (with the graphics data in a special format), you will need a special driver to create this format. That's the reason why LASERBRAIN was created. It is supposed to work with almost every known program and to be easy to handle. Besides this, every user should have the possibility to customize the program's features according to his demands. HOW DOES LASERBRAIN WORK? LASERBRAIN is installed as a desk accessory in the memory of your Atari ST. It intercepts all output to the printer port which is made by using the standardized OS calls and re-directs it to the LASERBRAIN buffer, where the information is stored until the page is ready to be printed. While printing, the data is converted into a format appropriate to the laser printer. Special assembler routines are used to provide this very fast conversion. This means that just a small part of the usually needed buffer (about one megabyte) is required. LASERBRAIN is controlled by control codes and escape sequences compatible with IBM dot-matrix printers. As almost every existing program for the Atari ST is fully compatible with these control sequences, LASERBRAIN can be used with these applications without need for further modifications. LASERBRAIN also includes a number of enhancements, making it possible, for example, to enlarge and reduce the size of graphics output of an application program. LASERBRAIN also provides full support for the ST screen dump routine, which can be activated at any time by pressing the + keys. IMPORTANT INFORMATION ABOUT WORKING WITH THE ATARI SLM804 Make sure to turn on your laser printer before turning on your computer and never have the printer turned off while working with your computer!!! When turned off, the printer controller disturbs the data-flow between the computer and the floppy or hard-disk. Because of this, loss of data may occur. So if you don't need your laser printer, turn it on nevertheless or disconnect the plug from the DMA-port of the computer, while both units are switched off ! HINT: If your printer is connected (and switched on), you can get rid of the fan's noise by opening the printer's housing lid at the back just so much that heater and fan are automatically switched off. This is not very elegant, but it works and is not dangerous. MANUAL INSTALLATION To install LASERBRAIN, you need LASER_E.ACC on your boot disk. Make sure that no more than six accessories are installed at the same time. Now restart the system and LASERBRAIN will be loaded and then be ready to be activated. Like this, the programm will remain completely inactive and occupy about 30 kbytes of RAM. If you want to activate LASERBRAIN, just click on LASERBRAIN in the "DESK" menu. (To avoid difficulties with TOS, please install LASERBRAIN only from the desktop and not from within an already running program). LASERBRAIN will prompt you with a dialog box asking for the required buffer size. Enter the size of buffer you need for fonts, texts and/or graphics. Keep in mind to leave a minimun of 128K for other applications. The quantity may either be given in bytes or, by adding a "K" suffix, in kbytes. So wether you enter"1024000" or "1000K", the effect is just the same. In case of having requested too much or too little memory for the buffer, LASERBRAIN will respond with an error dialog(see Error Messages ), allowing you to abort the installation or try again with a new value. If you find yourself working with an application and having called up LASERBRAIN accidentially, type "0" as the required quantity to abort the installation ( the majority of programms will not, unfortunately, tolerate an accessory requesting memory while they are in use). If the installation was successful, the printer driver displays the appropriate dialog box and waits for any key to be pressed. If you don't want this additional 'press any key' request, input an "=" as the first character when specifying the buffer size (e.g. "=600K"). This especially is recommended for automatic installation. AUTOMATIC INSTALLATION You may, if you wish, completely automate the installation. After LASERBRAIN has been loaded from the boot-disk, it will search the root directory for a configuration file called LASBRAIN.BAT. If this file can't be found, LASERBRAIN must be manually installed (see Manual Installation ) If this file is found, LASERBRAIN automatically reserves the desired buffer size, the screen dump factor is set and the given fonts are loaded. Therefore a configuration file like this is needed: =600K (buffer size) 4 (hardcopy size) B:\FONTS\ELITE.DRF (font or configuration file) Here the first line is used to set the buffer size, the second contains the hardcopy enlargement factor (1-5) and the third gives the pathname and filename of the fonts to be loaded.If the font file is located in the same directory as the accessory, the pathname may be omitted. (Rules for the loading of fonts see Using LASERBRAIN ) Only one font file can be loaded. If you want to load a number of fonts, you must first combine them to form a single configuration file (see Using LASERBRAIN: Loading Fonts ). The overall length of the text file may not exceed 126 characters. It can be created by using any text editor or word processor (e.g. 1st Word / Wordplus {with WP mode turned off!}, Tempus or micro-Emacs) capable of saving files in plain ASCII format. SELECTING THE BUFFER SIZE How big a buffer does LASERBRAIN need? Storing a full DIN A4 page {translator's remark: DIN A4 is a european page size, somewhere between LETTER and LEGAL sizes. It might be neccessary to reserve more buffer space for LEGAL sized pages.} would normally require almost one megabyte of RAM. However, with the use of highly optimised graphics routines, LASERBRAIN remarkably reduces the required buffer size. Note that the amount of buffer space required depends on the kind of data to be printed. As already mentioned, the data being sent to the laser printer is not converted to a suitable form until printing has actually started. The faster this conversion takes place, the smaller the buffer for intermediate storing may be. Printing text is relatively rapid and therefore does not require a large buffer. If the page to be printed contains a lot of graphics, or if you require a scaled screen dump, the conversion takes more time and therefore will require a larger buffer. The table below shows typical buffer sizes: Buffer Type of output 40K hardcopies in sizes 3 to 5 100K text output containing some graphics 270K hardcopies in any size 600K a full DIN A4 page containing med/low res. graphics >=1MB a full DIN A4 page containing high res. graphics If the buffer size is not large enough, the page will not appear as a continuous image, but will be interrupted by one or more stripes, varying in width, of an irregular grey pattern. The number and width of these stripes may, with a little practice, be used to estimate how much storage space the emulator actually requires for a correct print-out. Because of the variety of possible applications, there is no general rule as to buffer size, nor is there a "standard size". But after short, you will be able to estimate in advance how much space to reserve for a particular print-out. Keep in mind, that the sizes shown above are meant without fonts and so please add an appropriate size to the required buffer. You can, however, clear the buffer by deleting any fonts not needed for the print-out. Note: you will find that the free buffer size as shown in the accessory is about 35K less than reserved. The reason is, that in addition to it's main buffer, LASERBRAIN requires a temporary graphics buffer while printing. The minimum size for this buffer is 35K. HARDCOPIES With an active LASERBRAIN it is possible to have a hardcopy of the screen at any time (except while reading/writing from/to floppy or harddisk) by pressing the & keys at the same time. You can enlarge or reduce the size of the printed image by choosing a screen dump scaling factor as shown in the table below. The printed hardcopy is also rotated by 90 degrees to provide an optimum usage of the paper size. The following sizes are available: scaling horizonal vertical minimum factor size (cm) size (cm) buffer size 1 3.39 5.42 180K 2 6.77 10.84 270K 3 10.16 16.26 40K 4 13.55 21.67 40K 5 16.93 27.09 40K To print the various hardcopies, different buffer sizes are needed. If there is not enough space left for a small hardcopy, LASERBRAIN will show the appropriate error-dialog (see: Error Messags ). You may then choose to try again with a larger scaling factor or abort the screen dump altogether. USING LASERBRAIN If you have already installed the emulator, clicking on the LASERBRAIN accessory will produce the emulator's main configuration dialog. The configuration dialog has three main parts: * The top of the dialog provides information about the total buffer size, the free space within the buffer available to store fonts and page data, and the size of the current page (see: Printing with LASERBRAIN for more details). * The left hand side of the dialog provides information about the style and attributes of the active font. * The right hand side of the dialog contains a series of buttons used to access various functions supported by the emulator (see below). The buttons are accessed either by clicking on them or through the keyboard equivalents. (Feel free to make a hardcopy of the main dialog box for a better understanding of the text.) load font/configuration key: allows you to load one or more fonts from disk. The new fonts are attached to the end of the current font list. Note that loading new fonts clears the current page from the buffer! This function will also load most GDOS fonts and convert them to the emulator's internal format. This gives you access to a large number of existing font styles and sizes and also enables you to create or modify emulator fonts by using a GDOS font editor (e.g. Fontz ...). save configuration key:<#> creates a single configuration file containing all fonts currently loaded into the emulator along with their font numbers and attributes. Using this option allows you to compile a series of fonts into a single file suited to your needs. delete font key: deletes the active font from the emulator's buffer. The current page is also deleted. Your configuration file will not be effected unless you resave it afer having deleted a font. delete/clear page key: clears the contents of the page buffer. print page key:<*> prints the current page and clears the page buffer. laser off key: activates and de-activates the emulator. If the 'laser off' button is inverted (black) the emulator is suspended and data is sent in the usual way to the computer's Centronics port. This option allows you to operate a conventional dot-matrix printer alongside with your Atari laser, switching between the two by using the 'laser off' button. 1..5 key:<1>..<5> selects the scaling factor used in producing hardcopies. previous font key: moves an imaginary cursor up in the font list, selecting the font before the current font. As a font is selected from those resident in the emulator's buffer, the name of this font is inserted in the "active font" box. next font key: moves an imaginary cursor down in the font list, selecting the font after the current font. As a font is selected from those resident in the emulator's buffer, the name of this font is inserted in the "active font" box. active font key: produces a window showing all or some of the characters in the active font. Additional information about the active font is shown at the bottom of the window, including: * The number of characters contained within the font * The maximum width of the characters within the font in units of 1/300th of an inch. This information is used to define the character density (see: Printing Text with LASERBRAIN ) * The height of the font in units of 1/300th of an inch. This information is used whenever the AUTO LINE FEED option is enabled (see: Other Commands). * The maximum number of lines that would fit onto a page using this font. Pressing the left mouse button or pressing any key will exit from the font window to the main dialog. font number key: increases or decreases the font number associated with the active font. The font number is used by the emulator to define which attributes are to be used with the active font. Clicking on the font number itself will return it to 1. For more information see: Printing Text with LASERBRAIN and Otrher Commands. font attributes key:.., will set the attributes for the active font. In practice this means that the font will be activated if the same combination of attributes has been selected by the application. For example, if a particular font has the italics and emphasized buttons selected (irrespective of wether that font is active or not), sending the control sequences for Italic On and Bold On to the emulator will select that font (see: Printing Text with LASERBRAIN ). exit key: clears the emulator's configuration dialog and returns control to the application or GEM Desktop. PRINTING WITH LASERBRAIN One important thing to learn about laser printers is that, unlike dot- matrix printers, they print a whole page at a time. In practice they build up a page of text and/or graphics and only start to print the page when it's full or when they are told to.Whenever you have a small text file or document you need to indicate that you want to print the current page without filling it up. LASERBRAIN will start printing a page when one of the following things happens: * The Print Page button in the emulators control dialog is selected. * A Form Feed control character is received by the emulator or * The emulator 'discovers' that the next line of text will not fit onto the current page. Once a laser has started printing, it is unable to stop in the middle of a page and then resume printing. Whatever happens, it must allow the sheet to run through at constant speed. You can check whether the page buffer still contains data - e.g. at the end of a long document - by checking the current page size at the top of the emulators control dialog. If the page size is non-zero, the emulator's buffer still contains some data. HOW TO USE THE PRINTER'S MANUAL FEED It is possible to feed the SLM804 manually: * Pull the paper tray until the red 'add paper' sign appears. * Start printing. * When the green 'ready' sign appears, please insert a single sheet of paper ensuring that it is pushed up against the left-hand paper guide. Make shure that the side to be printed on shows up. * The printer automatically draws in the sheet of paper and starts printing. Note: the maximum page size the printer can handle in this mode is LETTER size. So if you use DIN A4 or LEGAL sized sheets, the printer will handle them as Letter sized sheets, too. PRINTING TEXT WITH LASERBRAIN One of the major advantages of a laser printer compared to a dot-matrix printer is undoubtedly being able to obtain letter quality output at a higher speed and with less noise. LASERBRAIN also provides the flexibility of loading additional styles and sizes of fonts from floppy or hard disk. The maximum number of fonts that can be used at the same time is 256. In practice, the only limitations are imposed by the amount of memory available. The various fonts held in the emulator's buffer are selected either manually by selecting a font using the emulator's control dialog, or by sending a series of control codes that tell the emulator to switch fonts while printing. In order to simply print with LASERBRAIN it is not absolutely neccessary to read the following section. The configuration file provided with the emulator will be suitable for use with most applications. However, if you want to create your own configurations for special applications, the following information will be of interest: A font may be selected by using control codes that represent the following attributes: * letter quality * proportional spacing * ELITE print width (the default is PICA) * condensed * expanded * subscript * superscript * bold * italics Each of these features can be turned on or off individually (using the standardized Epson compatible control codes) or jointly with others (using the expanded control codes 'set font' and 'set style'). LASERBRAIN then tries to locate a font in its buffer that has attributes matching the current control code settings. Each font held in the emulator's buffer carries an identification. This ID has two parts: the font number and the font attributes. Both of these parameters can be set for each font individually. From the font number the emulator can tell whether the font should be used where letter quality (LQ) and/or proportionally spaced output is requested. LQ prop. font no. used no no 1 yes no 2 no yes 3 yes yes 4 The font attributes tell the emulator for which combination of the remaining seven attributes the font should be used. If you, for example, use the standard control code to switch to letter quality ("x"1), and proportional spacing is disabled, the printer driver activates the font that carries a font number of 2 (see table) and has font attributes that correspond with the remaining seven settings. If the buffer does not contain a font that meets these requirements, LASERBRAIN either uses the system character set (YORK 16) or, if the font number was located, but there is no font with matching attributes, it uses the font that can be found with the largest number of matching attributes and which has no undesired attributes set. If a font without any attributes set is requested, but all fonts currently installed have attributes set, the system character set (YORK 16) will be selected. The emulator only recognizes a font by its font number and attribute settings, it is not at all concerned with what the font in question actually looks like. You can therefore declare a quite ordinary font as bold and italic by setting the bold and italic attribute flags from within the emulator's control dialog. Three of the attributes covered above have an additional effect. With dot- matrix printers, these attributes usually operate as follows: * Elite sets the character width to print 12 characters per inch (12 CPI). If Elite is switched off the printer is set at Pica (10 CPI). * Condensed print increases the character density by a factor of 1.7 by reducing the character size accordingly. * Expanded print doubles the width of all characters. These three attributes may be combined in various ways. The table below shows the corresponding effects: ELITE CONDENSED EXPANDED CPI CHAR./LINE (A4 page) off off off 10.0 78 Chrs on off off 12.0 94 Chrs off on off 17.6 138 Chrs on on off 21.4 167 Chrs off off on 5.0 39 Chrs on off on 6.0 47 Chrs off on on 8.8 69 Chrs on on on 10.7 84 Chrs If proportional spacing is switched off, LASERBRAIN tries to locate the appropriate font and adjust the character spacing to obtain the desired character density as shown above. Note that this overrides any character spacing set by using 1B 03 [n]. If the selected font is too wide to achieve the desired character spacing, the spacing is automatically set to 0 and adopts the current font's maximum character width in determining character spacing. In this case the character density will not match the values shown in the table. If proportional spacing is turned on, the corresponding font is choosen and the emulator derives its character spacing from the value of byte variable 11 (0B hexadecimal), the default value being 5/300ths of an inch. For further information see Other Commands. PRINTING GRAPHICS WITH LASERBRAIN The FULL emulation of a dot-matrix printer on a laser printer causes certain problems, particulary when handling graphics. This is because the Atari SLM804, along with most other laser printers, has a resolution of 300 dots per inch (dpi) in both directions. Dot-matrix printers on the other hand have a large number of varying resolutions. With a 9-pin dot-matrix printer resolutions are selectable, starting with with a very basic 60 dpi horizontally and 72 dpi vertically. To emulate these resolutions on the Atari laser printer, LASERBRAIN uses several laser pixels to simulate a single dot-matrix pixel. However, since the conversion factor is not always an integer (e.g. 300/72=4.1666..), two adjacent pixels of identical resolution on a dot-matrix printer may, using the emulator, appear to be of different sizes owing to inevitable rounding off errors. The difference will never be more than 1/300th of an inch, but may still be visible, particulary where a page contains thin lines. As you will see from the section on Graphics Commands, sixteen different graphics modes are available. The first seven modes emulate those found on dot-matrix printers. Details of each mode are shown in the section on Graphics Commands. Graphics modes 3 and 8 support interlacing. If these modes produce a striped print-out, turn interlacing off (i.e. set the interlacing value to zero). If pages printed in modes other than 3 and 8 appear smudged, using one of the interlaced modes with an interlaced value of 1/2 or 2/3 of the pixel height will sharpen the overall appearance of the page. The vertical and horizontal resolutions of any graphics mode are user- definable. The horizontal resolution can be set from 18.75 dpi to 19660800 dpi, although in practice one would rarely use a resolution higher than the maximum resolution the laser can support. The redefinition can be achieved by setting the corresponding grid variable. It is perfectly possible to reduce the size of an image by increasing the resolution of a graphics mode, however, with resolutions above 300 dpi pixels are 'swallowed' at certain points to achieve this reduction. The emulator's vertical resolution is also user-definable by setting the appropriate grid variable, although in this case there is no lower limit of 18.75 dpi. By altering the horizontal and vertical resolutions you may set the height of individual pixels to suit your own requirements. Using this approach it becomes very easy to produce specialised images such as bar codes. Remember, if you redefine the vertical resolution of a graphics mode that supports interlacing, you will also need to modify the interlace value to suit the new resolution (if the the interlacing is non-zero). If your application produces accurate images, modifying the horizontal and/or vertical resolutions will allow you to compensate for the difference in pixel sizes between the Atari SLM804 and a dot-matrix printer. When tayloring a graphics mode, bear in mind the maximum possible size for the paper size in use. See the section on Paper Formats for further information. Example: An application prints an image 400x640 pixels in size onto an DIN A4 page. The following program, written in GFA basic, calculates and sets the horizontal and vertical resolution. You would, therefore, use this or a similar program to initialise the emulator before running the application. mode = 3 ! the application uses mode #3 xmax = 2336 ! horizontal size of paper in pixels (DIN A4) xgraph = 400 ! horizontal size of image in pixels LPRINT CHR$(&1B);CHRS$(5);CHRS$(4*mode+1);MKL$(xmax/xgraph*65536); ! horizontal resolution adjustment ymax = 3386 ! vertical paper size in pixels (DIN A4) ygraph = 640 ! vertical size of image in pixels LPRINT CHR$(&1B);CHRS$(5);CHRS$(4*mode+1);MKL$(ymax/ygraph*65536); ! vertical resolution adjustment ! do not set interlacing LPRINT CHRS$(&1B);CHRS$(4*mode+2);MKL$(0); END ! program end PAPER FORMATS The Atari SLM804 is able to use standard copier paper and heat resistant acetat sheets (at least 180 degrees centigrade). The maximum printable surface is normally as follows: Format Pixels Size (inches) Size (cms) DIN A4 horizontal 2336 7.79 19.78 vertical 3386 11.29 28.68 DIN B5 horizontal 2016 6.72 17.69 vertical 2914 9.71 24.67 Letter/manual feed horizontal 2400 8.00 20.32 vertical 3180 10.60 26.92 Legal horizontal 2400 8.00 20.32 vertical 4080 13.60 34.54 The Atari laser printer identifies the current paper format from three small grooves on the rear right hand side of the paper tray. LASERBRAIN automatically adjusts to the corresponding size, so that the entire paper area can be utilised with the exception of a small 1/4" border around the edge of the paper. When manual feed is being used, the printer cannot recognize the paper format, and always assumes that it is printing on LETTER sized paper. ERROR MESSAGES If any problems are encountered while LASERBRAIN is operating, an error dialog will be displayed describing the error. The dialog normally gives you the option of trying the operation again after having removed the cause of the error, or cancelling the operation completely. Clicking on either the left- or right-hand mouse buttons respectively will CANCEL or RETRY the operation. A list of possible error messages is shown below: PRINTER ERRORS Please insert a disk to continue! This dialog will appear with an additional accustic signal. There is still a disk drive selected with no disk inside. This might happen if you booted not from a disk, but from the harddisk. The dialog will disappear automatically after a disk has been inserted. It is not neccessary to press a key. The printer is not on-line/not connected! LASERBRAIN cannot locate a laserprinter attached to the DMA port. Possible reasons include: * the laser printer is not properly connected or not connected at all. Check that all cables are connected correctly. * the laser printer is not switched on. The printer must remain switched on at all times! * the laser printer's device I.D. has been wrongly set in the SLMC804 controller box, making it appear identical to another peripheral such as a harddisk. The controller box's device I.D. is factory-set to 7 and hard disks are set to 0 or 1 so, in theory, this situation should never arise. LASERBRAIN sequentially searches all eight possible DMA addresses for a laser printer. Maybe try again after having the system. General hardware error! Please check that all lids of the printer's housing are closed and that all cables are connected properly! Add toner! (continue printing?) The laser printer's toner supply is running low; insert a new toner cartridge. There is still enough toner to print a few more pages. So if you have no new toner cartridge at hand, press the right mouse button to 'repeat'. Still warming up! The laser printer needs a short period of time to warm up after switching on. Wait until the green light appears on the printer's control panel before retrying. If your printer continues to show a red light for more than two minutes, there may be a hardware problem. Add paper! (You may use the manual feed instead) This error will appear immediately after the last page of the tray has been used. Refill the paper tray and then press the key for 'cancel' If the tray has not been refilled, LASERBRAIN will automatically wait for manual feed. 'Repeat' will print the last page once more. Replace drum! The laser printer's photo sensitive drum has malfunctioned or has not been inserted properly. Refer to your owner's manual for information on obtaining and fitting a replacement drum. Paper input jam! Paper is jammed in the paper feed. First check the paper tray to see wether the paper jam has occured as the paper is fed into the printer. If this area is clear open the printer housing by pulling upwards on the handle just above the paper tray (see the laser printer owner's manual). Next tilt the single sheet guide slightly upwards, then pull it down forwards. This releases the paper feed, allowing you to remove any sheets that are jammed. Paper jam inside! Paper has jammed somewhere inside the laser printer. To remove the jammed sheet, open the housing by means of the handle at the front of the printer (see the laser printer owner's manual). Pull the sheet of paper out of the printer as carefully as possible. It is likely that any image on the jammed sheet of paper will not yet have been fused resulting in a loose layer of toner on the surface of the paper. Avoid inhaling or touching the loose toner powder. If the sheet has jammed in the fusing unit, the fusing rollers may become contaminated. See the section about Cleaning in your laser printer owner's manual. Paper jam in paper stacker! Paper has jammed in the stacker. Lift the laser printer's cover off backwards and check for jammed sheets of paper. Carefully remove any paper and close the printer's rear cover. When printing long documents, it is recommended that you only load about 50 sheets at a time. This may mean that you have to re-load a number of times, but this is generally worth it to avoid a document jam. Close cover! Make shure that the front and rear box lids are closed. Printer timeout! (only with manual feed) Whenever you use the manual feed, you have to insert the page to be printed on within a minute. If not, this error message will appear. If this error appears while not using the manual feed, the will be an error of the following kind: Fuser malfunction! Imager malfunction! Motor malfunction! Video malfunction! Controller has timed-out! Carefully check each of the cable connections in your system. If you fail to remedy one of these faults after a number of attempts, try restarting your system completely. If the problem persists, contact your Atari dealer. Invalid command code! Invalid device number! Invalid parameter list! You may have a laser printer controller that is not fully compatible to the SLMC804. If the problem persists, contact your Atari dealer. OPERATING FAULT ERROR MESSAGES Buffer too small! The minimum buffer size is 40 kbyte. You must reserve at least this amount of memory for the buffer on installation. Buffer too large! Too much memory was reserved for the emulator's buffer during installation. Remember to leave at least 128K Bytes free for applications. File not found! The font or configuration file requested does not exist. File read error! The font or configuration file requested cannot be loaded. The disk containing the file may be damaged. It may sometimes help to remove the disk from the drive for a while before replacing it and retrying. Font buffer full! Insufficient buffer space exists to load the requested font or configuration file. File creation failed! The emulator's attempt to write a configuration file has failed. The file or the disk may be write protected. File write error! The emulator's attempt to write a configuration file has failed. The disk you are trying to write to may be damaged. Retry with another disk. Disk Full! LASERBRAIN's attempt to write a configuration or font file to disk has failed because the disk has no more space left. Page Full! The current page has become so large that there is no space left in the buffer for additional graphics or text. The page must be deleted. Buffer not large enough for selected hardcopy size! CANCEL or RETRY with another size? After deducting the size of the resident fonts and the contents of the current page from the buffer size, the remaining space in the buffer is insufficient for a screen dump in the requested size. You may cancel the screen dump by pressing the left mouse button. If you depress the right mouse button ("RETRY"), the hardcopy will be made in the next possible size. CONTROL CODES Terminology: - all control codes are given in hexadecimal notation and in ASCII format. ASCII codes will be denoted in pointed brackets and capital letters (eg. ). Parameters (variable values) will be denoted in square brackets (eg. [n]). Digits which are not in parantheses represent the ASCII character that has this decimal value (e.g. 0 means the ASCII character with the value 00, the character). - the character "#" signifies "number" - the term "cursor" will be frequently used in this section. Please note that this does not refer to the screen cursor, but to an imaginary cursor that points to the current position in LASERBRAIN's page buffer. This corresponds to the print head position of a traditional dot matrix printer. If you read, for example, "The cursor is moved down one line..." this means that subsequent characters will be printed one line down. - LASERBRAIN offers some extended commands, which are not found in dot matrix printers. These commands are marked with a trailing "EXTRA:". VERTICAL POSITIONING 0C Formfeed. The current page is printed out and then deleted from the buffer. The emulator then places its cursor at the top left-hand corner of the new page. The single-line expanded print function is also cancelled. The number of copies to be printed of a page is adjustable. Please refer to section on "Byte Variables" for further detail. 0A Linefeed. The cursor will be moved down one line. The line spacing is preset at 1/6 inch, but is user-definable. The AUTO LINE FEED option can also be selected (please refer to the appropriate section). In this case, the height of the current font will be added to the line spacing. 1B 0A Reverse line feed. The cursor is moved up one line. The line spacing is preset at 1/6 inch, but is user-definable. The AUTO LINE FEED option can also be selected (please refer to the appropriate section). In this case, the height of the current font will be added to the line spacing. Note: Because of the way the emulator works, subsequent text may be truncated if the buffer size is smaller than required for a full graphics page. 1B 61 [n] "a" [n] The cursor is moved down [n] lines with the current line spacing. 1B 4A [n] "J" [n] The cursor moves down [n]*YGRID, with YGRID being the current grid spacing. The default value for YGRID is 1/216 inch. 1B 6A [n] "j" [n] The cursor moves up [n]*YGRID, with YGRID being the current grid spacing. The default value for YGRID is 1/216 inch. Note: Because of the way the emulator works, subsequent text may be truncated if the buffer size is smaller than required for a full graphics page. 1B 30 "0" Sets the line spacing to 27*YGRID. Using the default value of YGRID, this will result in a line spacing of 1/8 inch. 1B 31 "1" Sets the line spacing to 21*YGRID. Using the default value of YGRID this will result in a line spacing of 1/72 inch. 1B 41 [n] "A" [n] The result of the execution of this comand depends on the emulation flag (byte variable 0C hex). NEW version (flag=0): The line spacing is preset to to [n]*YGRID2. Using the default value of YGRID2 this gives a line spacing of 1/72 inch. This preset must be activated with "2" ! OLD version (flag>0) The setting will be effective imediately. 1B 32 "2" The result of the execution of this comand depends on the emulation flag (byte variable 0C hex). NEW version (flag=0) The line spacing preset with "A" [n] is acticvated. OLD version (flag>0) The line spacing is set to 12*YGRID2. Using the default value of YGRID2 this gives a line spacing of 1/6 inch. 1B 33 [n] "3" [n] The line spacing is set to [n]*YGRID, with YGRID being the current grid spacing. The default value for YGRID is 1/216 inch. 0B The cursor moves from its current position to the next vertical tab stop. The tab stops can be set with "B" [t1] [t2] [t3]...0. The default vertical tab setting is 1, i.e. on every line. 1B 42 [t1] [t2] [t3]...00 "B" [t1] [t2] [t3]...0 This code sequence sets the vertical TAB positions on the specified lines. The values [t1], [t2] etc. indicate the offset from the top margin of the page in lines. For example, the sequence "B" 3 8 0 would set vertical TABs in lines 4 and 9. These settings are then repeated, so that a third command would then move the cursor to line 12, the fourth to line 17 and so on. The values in the list must be arranged in ascending order. The sequence ends with the first value that is smaller than its predecessor. Up to 255 vertical tabulators may be set with the maximum value of each TAB setting being 255. 1B 43 [n] "C" [n] Sets the page length in lines (before deducting the upper and lower margin). The value in [n] must be in the region 1 to 255. The page length calculation takes account of the current line spacing and whether AUTO LINEFEED is enabled. Whenever data is sent to the page buffer, LASERBRAIN checks to see whether the set page length has been exceeded. If the page end has been reached, the current page is printed. To prevent the emulator from automatically printing a page, set a large paper length, possibly even longer than the actual paper length. However, anything that would exceed the physical paper length will be truncated and lost. 1B 43 0 [n] "C" 0 [n] Sets the page length in inches (before deducting the upper and lower margin). The value in [n] must be in the region 1 to 255. Whenever data is sent to the page buffer, LASERBRAIN checks to see whether the set page length has been exceeded. If the page end has been reached, the current page is printed. To prevent the emulator from automatically printing a page, set a large paper length, possibly even longer than the actual paper length. However, anything that would exceed the physical paper length will be truncated and lost. 1B 4E [n] "N" [n] Sets the top of page margin to [n] lines using the current line spacing. The top of page margin is deducted form the page length set with "C". 1B 72 [n] "r" [n] Sets the bottom of page margin to [n] lines using the current line spacing. The top of page margin is deducted form the page length set with "C". 1B 4F "0" Resets both the top and bottom margins to zero. EXTRA: 1B 01 [n] [n] AUTO LINEFEED [n]=0: off [n]=1: on If Auto Linefeed is enabled, the vertical line spacing consists of the height of the current font plus the current line spacing. This means that the space between lines of characters remains constant, even if another font is selected. If Auto Linefeed is disabled, only the space between the top pixels of each row of characters will remain constant. EXTRA: 1B 09 [m] [n] [m] [n] Graphics line feed. The cursor is moved down [n] times the pixel height in graphics mode [m]. Normally, this command is used with [n]=8, if you wish to print multiple lines of graphics in such a way that no white lines or stripes show between those lines, without having to modify the value of YGRID. EXTRA: 1B 0B [m] [n] [m] [n] Reverse graphics line feed. The cursor is moved up [n] times the pixel height in graphics mode [m]. HORIZONTAL POSITIONING 08 Backspace. The cursor is moved one character position to the left. With proportionally spaced text the cursor moves back the width of the "blank" character ($20). Since this operation does not delete any characters, a number of characters can be superimposed using this method. 09 The cursor moves from its current position to the next horizontal tab stop. The tab stops can be set with "D" [t1] [t2] [t3]...0. The default horizontal tab setting is 8, i.e. every 8thcolumn. The width of the "blank" character ($20) in the current font is used to determine the width of one character position. 1B 44 [t1] [t2] [t3]...00 "D" [t1] [t2] [t3]...0 This code sequence sets the horizontal TAB positions on the specified columns. The values [t1], [t2] etc. indicate the offset from the left margin of the page in columns (one column being the width of the "blank" character ($20) in the current font). For example, the sequence "D" 2 8 0 would set horizontal TABs in columns 3 and 9. These settings are then repeated, so that a third command would then move the cursor to column 11, the fourth to column 19 and so on. The values in the list must be arranged in ascending order. The sequence ends with the first value that is smaller than its predecessor. Up to 255 horizontal tabulators may be set with the maximum value of each TAB setting being 255. 0D Carriage Return. The cursor is moved to the current left-hand margin. Single line expanded printing is disabled. 1B 6C [n] "l" [n] The left-hand page margin is set to the [n]th column (one column being the width of the "blank" character ($20) in the current font). 1B 51 [n] "Q" [n] The right-hand page margin is set to the [n]th column (one column being the width of the "blank" character ($20) in the current font). 1B 62 [n] "b" [n] Prints [n] spaces, starting at the current cursor position. A "space" has the width of the "blank" character ($20) in the current font. EXTRA: 1B 03 [n] [n] Sets the proportional spacing between characters to [n]/300 inch. This spacing is only used if proportional spacing is enabled. If proportional spacing is disabled while this command is executed, this setting will only be effective after proportional spacing is reenabled. CHARACTER SETTINGS 1B 52 [n] "R" [n] Selects a national character set. There are eight standardized versions of the ASCII character set, which may be selected by this command. This will result in the substitution of the characters with the hex codes 23, 40, 5B, 5C, 5D, 5E, 60, 7B, 7C, 7D, 7E by the characters of the selected national character set. The default setting selects the US character set ([n]=0). [n]: 0 1 2 3 4 5 6 7 Code USA France Germany UK Denmark Sweden Italy Spain 23 # œ # œ # # # # 40 @ … έ @ @  έ @ 5B [ ψ Ž [ ’ Ž ψ ­ 5C \ ‡ ™ \ ² ™ ‡ ₯ 5D ] έ š ]   ‚ ¨ 5E ^ ^ ^ ^ ^ š ^ ^ 60 ` ` ` ` ` ‚ — ` 7B { ‚ „ { ‘ „ … Ή 7C | — ” | ³ ” • € 7D } Š  } † † Š } 7E ~ Ή ž ~ ~   ~ Actually this is a surplus command, because all characters maybe printed directly from the ST's character set (codes > $80). However, since there are programs which rely on said switch sequences, the emulator supports them. 1B 4D "M" Select Elite print width. On a standard dot-matrix printer this is usually 12 characters per inch. However, with LASERBRAIN the exact width will depend on the current font. 1B 50 "P" Select Pica print width. On a standard dot-matrix printer this is usually 10 characters per inch. However, with LASERBRAIN the exact width will depend on the current font. 0E or 1B 0E or Single line expanded printing. All characters following this code on the same line are printed enlarged. This function is cancelled by a , , , or code. Do not confuse this with the Permanent Expanded Print option. 14 Cancel single line expanded printing. 1B 57 [n] "W" [n] Permanent expanded printing on / off. [n]=0: off [n]=1: on 0F or 1B 0F or Enable condensed printing. On a standard dot-matrix printer this is usually 17 characters per inch. However, with LASERBRAIN the exact width will depend on the current font. 12 Cancel condensed printing. 1B 34 or 1B 78 01 "4" or "x" 1 Select LQ (letter quality) mode. This command exists only for the sake of compatibility with dot-matrix printers. There is no speed to be gained on a laserprinter by reducing the quality of the printout. For this reason, this command will only effect a change between two different sets of fonts, both in letter quality. However, the corresponding fonts must be installed. For example, you could switch between the Elite and the Swiss fonts by loading both font sets from the accessory and then choosing the font numbers for the first set of fonts to correspond to the "draft" mode and the font numbers for the second font set to correspond to the "LQ" mode. By changing between "draft" and "LQ" you could thus switch between the two sets of fonts. LASERBRAIN defaults to "draft" mode. For further details, please refer to the section on Printing with LASERBRAIN. 1B 35 or 1B 78 00 "5" or "x" 0 Cancel LQ (letter quality) mode. Engage draft mode. Please refer also to the "Select LQ mode" command above! 1B 70 [n] "p" [n] Proportional spacing on / off [n]=0: off [n]=1: on For additional information, please refer to the section Printing with LASERBRAIN. 1B 53 0 "S" 0 Enable Superscript mode. 1B 53 1 "S" 1 Enable Subscript mode. 1B 54 "T" Cancel Superscript or Subscript mode. 1B 47 "G" Enable double-strike printing mode. (Currently identical to bold printing.) 1B 48 "H" Cancel double-strike printing mode. 1B 45 "E" Enable bold printing mode. 1B 46 "F" Cancel bold printing mode. 1B 49 [n] "I" [n] Italics mode on / off. [n]=0: off [n]=1: on 1B 2D [n] "-" [n] Continuous Underlining on / off. [n]=0: off [n]=1: on Unlike the other seven text effects supported by the emulator, no individual character set is required to represent underlined text, i.e. any font can be underlined. EXTRA: 1B 02 [n] [n] Set font: font number [n] is selected as the current font. The font number is assigned to a font using the "font number" item in LASERBRAIN's configuration accessory. The current font as set by this command will be changed by any command that changes print styles or fonts, except for the "Continuous Underlining" command. EXTRA: 1B 07 [n] [n] Set style. Selects the font which has the eight attributes corresponding to the bits set in [n]. BIT set (=1) reset (=0) 7: italic normal 6: underlined normal 5: bold normal 4: superscript normal 3: subscript normal 2: expanded normal 1: condensed normal 0: ELITE (12cpi) PICA (10 cpi) The bits 0 to 7 correspond to the attributes, which can be set in the accessory by using the buttons 1 to 8. GRAPHICS COMMANDS 1B 2A [m] [l] [h] [g]... "*" [m] [l] [h] [g]... Bit Image Graphics with selectable resolution. The Bytes [l] and [h] indicate the number of bytes of graphics data that will follow the command, where [l] is the least significant and [h] is the most significant byte of an integer word. Thus, the number of bytes calculates as follows: Bytes= 256*[h]+[l] Each byte of graphics data represents 8 pixels in column, one above the other, with bit 7, the most significant bit, being at the top and bit 0, the least significant bit, being at the bottom of the column: o Bit 7 o Bit 6 o Bit 5 o Bit 4 o Bit 3 o Bit 2 o Bit 1 o Bit 0 The resolution of the bit image is set using the value of [m]. A total of 16 graphics modes are available: [m] Name: X-Res. Y-Res. Interlacing 00: Single Density 1/60" 1/72" 0 01: Double Density 1/120" 1/72" 0 02: Double Density 1/120" 1/72" 0 03: Quadruple Density 1/240" 1/72" 2/216" 04: Screen Resolution I 1/80" 1/72" 0 05: Plot 1/72" 1/72" 0 06: Screen Resolution II 1/90" 1/72" 0 07: 24 Pin Printer - Standard 1/180" 1/180" 0 08: 24 Pin Printer - High Res. 1/360" 1/180" 1/360" 09: Laser Printer - Standard 1/300" 1/300" 0 0A: Laser Printer - 1/2 Res. 1/150" 1/150" 0 0B: Laser Printer - 1/3 Res. 1/100" 1/100" 0 0C: Laser Printer - 1/4 Res. 1/75" 1/75" 0 0D: Laser Printer - 1/5 Res. 1/60" 1/60" 0 0E: Metric Resolution I 1 mm 1 mm 0 0F: Metric Resolution II 1/10 mm 1/10 mm 0 The preset resolutions and interlacing factor for each mode are shown in the table above. The horizontal and vertical resolutions can be defined by the user. Additionally, the interlacing factor for each mode can be set. This factor defines how much lower one pixel is printed below the one above it, resulting in a user definable gap between two pixels, which is often used with dot-matrix printers to obtain a higher resolution. The interlacing mode is supported by LASERBRAIN for reasons of compatibility only. - Modes 0 to 6 are available on 9 pin printers. Note that mode 2 normally differs from mode 1 in that it provides reduced output quality at twice the speed. The emulator makes no distinction between the two modes. - Modes 7 and 8 correspond in resolution to a 24 pin printer. - Modes 9 to 13 are based on the basic physical resolution of a laser printer and are therefore distortion free, with each pixel having an aspect ratio of 1 (i.e. the height of each pixel is exactly equal to its width). - Metric Modes 14 and 15 are particulary suited for printouts where the size of the image has to be reproducted correctly. For further information on using the emulator's graphics modes, please refer to the section Printing Graphics with LASERBRAIN. The following preset code sequences are identical to their corresponding "*" modes. 1B 4B [l] [h] [g]... "K" [l] [h] [g]... Single Density (60 dpi). Equivalent to mode 0. 1B 4C [l] [h] [g]... "L" [l] [h] [g]... Double Density. Equivalent to mode 1. 1B 59 [l] [h] [g]... "Y" [l] [h] [g]... Double Density. Equivalent to mode 2. With LASERBRAIN, mode 2 to is identical to mode 1. 1B 5A [l] [h] [g]... "Z" [l] [h] [g]... Quadruple Density. Equivalent to mode 3. EXTRA: 1B 04 [m] [n] [m] [n] Set Interlace factor: reduces the height of a pixel in bit-image mode [m] by [n]*YGRID. The overall size of the image is not affected by this procedure. It simply creates space "between the dots" for printing further dots, offset vertically, without causing them to overlap. Only values smaller than the pixel height are sensible. If a finer setting than multiples of YGRID is required, the Interlacing Grid Variable should be set directly. Default is an interlacing factor of 0, i.e. adjacent pixels are touching. EXTRA: 1B 05 [n] [b1] [b2] [b3] [b4] [n] [b1] [b2] [b3] [b4] Set the value of the grid variable [n] using the formula: ([b1] [b2] [b3] [b4])/300/65536 inches Where ([b1] [b2] [b3] [b4]) is read as single long word; b1 represents the most significant byte. Grid variables establish the size ratios used while printing an image. By altering these variables, LASERBRAIN can be effectively customised to meet special requirements. The variables are as follows: [n] Function default value 00: X-resolution for graphics mode 0 1/60" 01: Y-resolution 1/72" 02: Interlacing 0 04: X-resolution for graphics mode 1 1/120" 05: Y-resolution 1/72" 06: Interlacing 0 08: X-resolution for graphics mode 2 1/120" 09: Y-resolution 1/72" 0A: Interlacing 0 0C: X-resolution for graphics mode 3 1/240" 0D: Y-resolution 1/72" 0E: Interlacing 2/216" 10: X-resolution for graphics mode 4 1/80" 11: Y-resolution 1/72" 12: Interlacing 0 14: X-resolution for graphics mode 5 1/72" 15: Y-resolution 1/72" 16: Interlacing 0 18: X-resolution for graphics mode 6 1/90" 19: Y-resolution 1/72" 1A: Interlacing 0 1C: X-resolution for graphics mode 7 1/180" 1D: Y-resolution 1/180" 1E: Interlacing 0 20: X-resolution for graphics mode 8 1/360" 21: Y-resolution 1/180" 22: Interlacing 1/360" 24: X-resolution for graphics mode 9 1/300" 25: Y-resolution 1/300" 26: Interlacing 0 28: X-resolution for graphics mode 10 1/150" 29: Y-resolution 1/150" 2A: Interlacing 0 2C: X-resolution for graphics mode 11 1/100" 2D: Y-resolution 1/100" 2E: Interlacing 0 30: X-resolution for graphics mode 12 1/75" 31: Y-resolution 1/75" 32: Interlacing 0 34: X-resolution for graphics mode 13 1/60" 35: Y-resolution 1/60" 36: Interlacing 0 38: X-resolution for graphics mode 14 1 mm 39: Y-resolution 1 mm 3A: Interlacing 0 3C: X-resolution for graphics mode 15 1/10 mm 3D: Y-resolution 1/10 mm 3E: Interlacing 0 40: YGRID: vertical microspacing step size 1/216" 41: YGRID2: vertical line spacing step size 1/72" 42: LINE FEED 1/6" Three successive grid variables are used to define the parameters for a graphics mode. The following formula is useful in obtaining the grid variable numbers that represent a specific graphics mode: X-resolution for graphics mode [m] = variable number [m] * 4 Y-resolution for graphics mode [m] = variable number [m] * 4 + 1 Interlacing for graphics mode [m] = variable number [m] * 4 + 2 Variable numbers greater than hexadecimal 42 (66 decimal) are ignored. The variables with the numbers 03, 07, 0B, 0F ... 3B, 3F are reserved for future expansion and should not be used. If a graphics mode is set to a resolution of more than 300 dots per inch, LASERBRAIN will have to scale down the image during printout. This will inevitable result in the loss of some detail. If the image has to be enlarged (i.e. the resolution is set to less than 300 dpi), the resulting printout will be coarsened. Note: A single pixel may not be wider than 16 laser pixels (16/300 inch). Example: Let us assume that you want to set the vertical resolution of graphics mode M to Y dots per inch. An example in GFA Basic would look like this: LPRINT CHR$(&1B);CHR$(5);CHR$(M*4+1);MKL$(300*65536/Y) The MKL$ function turns the number passed to it into a string representing the four bytes of a long word, most significant byte first. The Basic line above will send the sequence 1B 05 14 00 03 C0 00 to the emulator, setting variable number 20 (the x-resolution of graphics mode 5) to $00*256+$03*1+$C0/256+$00/65536 = 3.75 . This means that every pixel in graphics mode 5 will be printed 3.75 laser pixels wide, thus resulting in a horizontal resolution of 3.75/300 = 1/80 inch. EXTRA: 1B 7F [a4][a3][a2][a1] [x2][x1] [y2][y1] [a4][a3][a2][a1] [x2][x1] [y2][y1] Insert Bit-Map Graphics. This command sequence can be used to insert a bit-map graphics into a page, where [a4][a3][a2][a1] is a long word that contains the address of the bit-map in your ST's memory. [x2][x1] is the width and [y2][y1] is the height of the bit image. LASERBRAIN will NOT copy the bit image into its buffer, but will only memorize the command sequence. The actual bit-map is copied into the page at the time of the printout. This helps to save buffer space but implies that the bit-image must remain in memory until it has been printed. Further conditions: - the width of the bit-map must be given in multiples of 16 - the width of the graphics may not exceed the paper width, otherwise the part of the image that exceeds the right margin of the page will be "rotated" to the left margin of the page. - the bit-map will be inserted into the page at the current cursor position. If the x-coordinate of the cursor is a multiple of 16, then LASERBRAIN will be able to achive a much higher processing speed and use only little buffer space during printout. If the cursor position does not meet this condition, more buffer space will be required. Example: (GFA-BASIC) 'Put screen as bit-map onto the page DEFLINE 1,1 FOR w=0 TO 2*PI STEP 2*PI/360 DRAW 320,200 TO 320+200*SIN(w),200+200*COS(w) NEXT w DEFLINE 1,20,1,1 DRAW 0,0 TO 639,399 LPRINT "Screen Dump with LASERBRAIN:" ' insert screen ino page LPRINT CHR$(&H1B);CHR$(&H7F);MKL$(XBIOS(3));MKI$(640);MKI$(400); ' one more time... LPRINT STRING$(16," "); LPRINT CHR$(&H1B);CHR$(&H7F);MKL$(XBIOS(3));MKI$(640);MKI$(400) ' print page (FORM FEED) LPRINT CHR$(12); OTHER COMMANDS 18 Deletes the current line from the print buffer and cancels the single-line expanded print mode. 7F Deletes the last character from the buffer. This has the same effect as if the character had not been sent at all. 1B 40 "@" Printer Initialisation. All of LASERBRAIN's adjustable parameters are reset to their default values. EXTRA: 1B 06 [n][b] [n][b] Set byte variable [n] to value [b]. Byte variables are used to control various functions of the emulator. Since byte variables are user adjustable, they can be used to customize LASERBRAIN for a particular purpose. The variables are as follows: [n] Function default value 00: current font 01 01: current style 00 02: font number for LQ off and prop. spacing off 01 03: font number for LQ on and prop. spacing off 02 04: font number for LQ off and prop. spacing on 03 05: font number for LQ on and prop. spacing on 04 06: index to byte variables 02 to 05 00 07: mask for style reset on FF 08: AUTO LINE FEED enabled if >0 00 09: automatic after if >0 00 0A: number of copies per page 01 0B: character spacing with prop. spacing enabled 05 0C: emulation flag (=0: new | >0: old) 01 Other variable numbers will be ignored. Function: 00, 01: are used internally during font selection. Especially commands that select or deselect LQ mode or proportional spacing will cause variable 0 to be set with the value found in the byte variable that variable number 6 is pointing to (02 to 05). You should not alter the byte varibles 00 and 01 directly, but by using the SET FONT and SET STYLE commands respectively. Setting the byte variables only will not activate the corresponding font. For the usage of the bits in variable number 01, please refer to the figure in the section on "SET STYLE". 02..05: contain the numbers of the fonts which shall be used for the respective combinations of LQ and proportional spacing on/off. By setting the variables 02 to 05 the fonts associated with the different combinations can be redefined without having to use the accessory. 06: LQ on/off sets/resets bit 0 of this variable. Prop. spacing on/off sets/resets bit 1 of this variable. This variable is used as pointer to byte variables 02 to 06, which contain the numbers of the fonts to be used for the selected combination of LQ mode and prop. spacing on/off. To calculate where variable 06 is pointing to, add 2 to the value of it, i.e. if the value of variable 06 is 0, it points to variable number 2. 07: Mask for style reset at the end of line (, or ). If a bit of this variable is reset, i.e. contains a zero, then the option corresponding to that bit position will be reset by any of the three codes mentioned above. Thus, this option is disenabled when variable 07 contains a value of $FF (255 decimal), which is also the default. Here is a list of the bit positions and the font styles they represent: BIT 7: italic 6: underlined 5: bold 4: superscript 3: subscript 2: expanded 1: condensed 0: ELITE (12cpi) (if reset: PICA (10 cpi)) Example: To select a single line italics printing, you would have to set Bit 7 of variable 07 to zero. This is done easily by doing a bitwise AND with a mask of $7F (all bits but bit 7 set). The GFA-BASIC should illustrate the procedure. LPRINT CHR$(&H1B);"M";CHR$(1); LPRINT CHR$(&H1B),CHR$(5),CHR$(7),CHR$(&H7F) 08: AUTO LINE FEED flag (0= off, 1= on) 09: If this variable contains a non-zero value, LASERBRAIN will add a line feed (LF) whenever it receives a carriage return . 0A: defines the number of copies per page, excluding hardcopies (always printed once). Default is 01, one copy per page. A value of 0 in this variable would print 256 copies per page. 0B: Spacing between characters with proportional spacing enabled. The value of this variable defines the width of the blank space between two characters, when proportional spacing is enabled, in laser pixels (one laser pixel is 1/300 of an inch wide). Changes made to this variable will not be effective until the next "proportional spacing on" command is executed. Normally, you should not set this variable directly, but use the "Set proportional character spacing" command (1B 03 [n]). 0C: Emulation Flag. The established "standard" for (9-pin) dot- matrix printers is not as "standardized" as it should be. Two major versions of the "standard" do exist, one slightly differing from the other. The major part of existing software supports the old version. The differences between the old and new versions concern the interpretation of the codes 1B 41 [n] and 1B 32, please refer to the section on these to codes for details. If you should encounter problems with a faulty line spacing, this setting might need adjustment. The new version is selected when this variable contains a value of zero, otherwise the old version will be enabled. EXTRA: 1B 08 Clear buffer. The current contents of the page buffer are cleared without printing the page. ESCAPE SEQUENCES - OVERVIEW 08 Backspace. The cursor is moved one character position to the left. 09 Horizontal TAB. The cursor moves from its current position to the next horizontal tab stop. 0A Line Feed 0B Vertical TAB. The cursor moves from its current position to the next vertical tab stop. 0C Form Feed. Prints the current page and clears it from the buffer. 0D Carriage Return. OE Single Line Expanded Printing ON. 0F Condensed Printing On. 12 Condensed Printing Off. 14 Single Line Expanded Printing OFF. 18 Delete Current Line. 7F Delete Character. The last character is deleted from the buffer. 1B 01 [n] AUTO LINE FEED ON (n=1) / OFF (n=0) 1B 02 [n] Set Font: font number [n] is selected as the current font. 1B 03 [n] Sets the proportional spacing between characters to [n]/300 inch. 1B 04 [m][n] Set Interlace factor: reduces the height of a pixel in bit-image mode [m] by [n]*YGRID 1B 05 [v] [b1][b2][b3][b4] | Sets the value of the grid variable [n] using the formula: | ([b1] [b2] [b3] [b4])/300/65536 inches 00 X-resolution for graphics mode 0 01 Y-resolution for graphics mode 0 02 Interlacing for graphics mode 0 04..3F X-res. , Y-res. and Interlacing for graphics modes 1...15 40: YGRID: vertical microspacing step size 41: YGRID2: vertical line spacing step size 42: LINE FEED: step size for command 1B 06 [v] [n] Sets byte variable [v] to [n] | 00 current font 01 current style 02 font number for LQ off and prop. spacing off 03 font number for LQ on and prop. spacing off 04 font number for LQ off and prop. spacing on 05 font number for LQ on and prop. spacing on 06 index to byte variables 02 to 05 07 mask for style reset on 08 AUTO LINE FEED enabled if >0 09 automatic after if >0 0A number of copies per page 0B character spacing with prop. spacing enabled 0C emulation flag (=0: new | >0: old) 1B 07 [n] Set Style. Selects the font which has the eight attributes corresponding to the bits set in [n]. 1B 08 Clear Buffer. The current contents of the page buffer are cleared without printing the page. 1B 09 [m] [n] Graphics Line Feed. The cursor is moved down [n] times the pixel height in graphics mode [m]. 1B 0A Reverse Line Feed. The cursor is moved up one line. 1B 0B [m] [n] Reverse Graphics Line Feed. The cursor is moved up [n] times the pixel height in graphics mode [m]. 1B 0E Single Line Expanded Printing ON (same as 0E ) 1B 0F Condensed Printing ON (same as 0F ) 1B 2A [m] [l] [h] [g]... | Selects graphics mode [m]. [l] and [h] indicate the number of | graphic data bytes [g] which will follow the command. | | | Name: X-Res. Y-Res. Interlacing 00: Single Density 1/60" 1/72" 0 01: Double Density 1/120" 1/72" 0 02: Double Density 1/120" 1/72" 0 03: Quadruple Density 1/240" 1/72" 2/216" 04: Screen Resolution I 1/80" 1/72" 0 05: Plot 1/72" 1/72" 0 06: Screen Resolution II 1/90" 1/72" 0 07: 24 Pin Printer - Standard 1/180" 1/180" 0 08: 24 Pin Printer - High Res. 1/360" 1/180" 1/360" 09: Laser Printer - Standard 1/300" 1/300" 0 0A: Laser Printer - 1/2 Res. 1/150" 1/150" 0 0B: Laser Printer - 1/3 Res. 1/100" 1/100" 0 0C: Laser Printer - 1/4 Res. 1/75" 1/75" 0 0D: Laser Printer - 1/5 Res. 1/60" 1/60" 0 0E: Metric Resolution I 1 mm 1 mm 0 0F: Metric Resolution II 1/10 mm 1/10 mm 0 (The table above shows the default values for the graphic modes) 1B 2D [n] Underlining ON (n=1) / OFF (n=2) 1B 30 Set LF to 27*YGRID (1/8") 1B 31 Set LF to 21*YGRID (7/72") 1B 32 Set LF as set by 1B 41 [n]. The result of this command depends on the condition of the emulation flag. 1B 33 [n] Set LF to [n] * YGRID ([n]/216") 1B 34 Letter Quality (LQ) mode ON 1B 35 Letter Quality (LQ) mode OFF 1B 40 Printer Initialisation 1B 41 [n] The line spacing is preset to to [n]*YGRID2. NEW version (emulation flag = 0 ): This preset must be activated with "2" ! OLD version (emulation flag > 0 ): The setting will be effective imediately. 1B 42 [t1][t2]..00 Set Vertical TAB Stops 1B 43 [n] Set Page Length to [n] lines per page 1B 43 0 [n] Set Page Length to [n] inches 1B 44 [t1][t2]..00 Set Horizontal TAB Stops 1B 45 Bold Printing ON 1B 46 Bold Printing OFF 1B 47 Double-Strike Printing ON (identical to BOLD ON) 1B 48 Double-Strike Printing OFF 1B 49 [n] Italics ON (n=1) / OFF (n=0) 1B 4A [n] Micro Line Feed. The cursor moves down [n]*YGRID, with YGRID being the current grid spacing. 1B 4B [l][h] [g]... Graphics Mode 0: single density (60 dpi) 1B 4C [l][h] [g]... Graphics Mode 1: double density (120 dpi) 1B 4D Select Elite print width (12 cpi) 1B 4E [n] Sets the top of page margin to [n] lines using the current line spacing 1B 4F Resets both the top and bottom margins to zero 1B 50 Select Pica print width (10 cpi) 1B 51 [n] The right-hand page margin is set to the [n]th column 1B 52 [n] Select national character set 0...7 1B 53 [n] Superscript ON (n=1) or Subscript ON (n=0) 1B 54 Superscript / Subscript OFF 1B 57 [n] Expanded Printing ON (n=1) / OFF (n=0) 1B 59 [l][h] [g]... Graphics Mode 2: double density (120 dpi) 1B 5A [l][h] [g]... Graphics Mode 3: quadruple density (240 dpi) 1B 61 [n] [n] line feeds 1B 62 [n] [n] blanks (spaces) 1B 6A [n] Reverse Micro Line Feed. The cursor moves up [n]*YGRID, with YGRID being the current grid spacing. 1B 6C [n] The left-hand page margin is set to the [n]th column 1B 70 [n] Proportional Spacing ON (n=1) / OFF (n=0) 1B 72 [n] Sets the bottom of page margin to [n] lines using the current line spacing 1B 78 [n] Letter Quality (LQ) mode ON (n=1) / OFF (n=0)